<?php /* Smarty version 2.6.16, created on 2011-10-29 19:16:11
         compiled from my_coach.tpl */ ?>
<div id="paging"> 
<div class="right-panel">
      <h1 title="My Coach"><span>My favourite coach</span></h1>
      <div class="searchpanel">
              <form action="" method="post">
			   <fieldset>
               <select for="sirt" name="sort_by" onchange="ManagerGeneral('<?php echo $this->_tpl_vars['page_name']; ?>
?action=list_order&OrderType='+this.value+'&from=<?php echo $this->_tpl_vars['from']; ?>
&from_page=<?php echo $this->_tpl_vars['from_page']; ?>
')">
                  <option value="ASC" <?php if ($this->_tpl_vars['OrderType'] == 'ASC'): ?> selected="selected" <?php endif; ?>>Star Rating (Low)</option>
				  <option value="DESC" <?php if ($this->_tpl_vars['OrderType'] == 'DESC'): ?> selected="selected" <?php endif; ?>>Star Rating (High)</option>
               </select>
               </fieldset>
             </form>
      </div>
      <div class="clear"></div>
 

	 <?php if ($this->_tpl_vars['NumCoach'] > 0): ?>
	  <?php unset($this->_sections['coachRow']);
$this->_sections['coachRow']['name'] = 'coachRow';
$this->_sections['coachRow']['loop'] = is_array($_loop=$this->_tpl_vars['CoachArr']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['coachRow']['show'] = true;
$this->_sections['coachRow']['max'] = $this->_sections['coachRow']['loop'];
$this->_sections['coachRow']['step'] = 1;
$this->_sections['coachRow']['start'] = $this->_sections['coachRow']['step'] > 0 ? 0 : $this->_sections['coachRow']['loop']-1;
if ($this->_sections['coachRow']['show']) {
    $this->_sections['coachRow']['total'] = $this->_sections['coachRow']['loop'];
    if ($this->_sections['coachRow']['total'] == 0)
        $this->_sections['coachRow']['show'] = false;
} else
    $this->_sections['coachRow']['total'] = 0;
if ($this->_sections['coachRow']['show']):

            for ($this->_sections['coachRow']['index'] = $this->_sections['coachRow']['start'], $this->_sections['coachRow']['iteration'] = 1;
                 $this->_sections['coachRow']['iteration'] <= $this->_sections['coachRow']['total'];
                 $this->_sections['coachRow']['index'] += $this->_sections['coachRow']['step'], $this->_sections['coachRow']['iteration']++):
$this->_sections['coachRow']['rownum'] = $this->_sections['coachRow']['iteration'];
$this->_sections['coachRow']['index_prev'] = $this->_sections['coachRow']['index'] - $this->_sections['coachRow']['step'];
$this->_sections['coachRow']['index_next'] = $this->_sections['coachRow']['index'] + $this->_sections['coachRow']['step'];
$this->_sections['coachRow']['first']      = ($this->_sections['coachRow']['iteration'] == 1);
$this->_sections['coachRow']['last']       = ($this->_sections['coachRow']['iteration'] == $this->_sections['coachRow']['total']);
?>
      <div class="game-list">
        
		   <div class="game-image">
		   <?php if ($this->_tpl_vars['CoachArr'][$this->_sections['coachRow']['index']]['photo'] != ''): ?>
		     <img src="uploaded/user_images/thumbs/big_<?php echo $this->_tpl_vars['CoachArr'][$this->_sections['coachRow']['index']]['photo']; ?>
" alt="<?php echo $this->_tpl_vars['CoachArr'][$this->_sections['coachRow']['index']]['name']; ?>
" border="0" />
		   <?php else: ?>	
		     <img src="images/coach_thumb.jpg" alt="<?php echo $this->_tpl_vars['CoachArr'][$this->_sections['coachRow']['index']]['name']; ?>
" border="0" />
		   <?php endif; ?> 
		   </div>	 
		    
		  
		  <div class="game-details">
             <h2><?php echo $this->_tpl_vars['CoachArr'][$this->_sections['coachRow']['index']]['name']; ?>
</h2>
            <p><?php echo $this->_tpl_vars['CoachArr'][$this->_sections['coachRow']['index']]['about']; ?>
</p>
             <p class="clear"></p>
			 <ul class="games-desc">
			    <li><span>Star Rating :</span> <?php echo $this->_tpl_vars['CoachArr'][$this->_sections['coachRow']['index']]['star']; ?>
</li>
			    <li><span>Language :</span> <?php echo $this->_tpl_vars['CoachArr'][$this->_sections['coachRow']['index']]['language']; ?>
</li>
				<?php if ($this->_tpl_vars['CoachArr'][$this->_sections['coachRow']['index']]['avail_local'] == 'Y'): ?>
			   <li><span>City (Local meet-up) :</span> <?php if ($this->_tpl_vars['CoachArr'][$this->_sections['coachRow']['index']]['availability_city'] != ''):  echo $this->_tpl_vars['CoachArr'][$this->_sections['coachRow']['index']]['availability_city'];  else: ?>N/A<?php endif; ?></li>
			   <?php endif; ?>
			 </ul>
			 <ul class="games-desc">
			   <li>&nbsp;</li>
			   <li><span>Availability :</span> <?php echo $this->_tpl_vars['CoachArr'][$this->_sections['coachRow']['index']]['availability_type']; ?>
</li>
			   <?php if ($this->_tpl_vars['CoachArr'][$this->_sections['coachRow']['index']]['avail_local'] == 'Y'): ?>
			   <li><span>Country (Local meet-up) :</span> <?php if ($this->_tpl_vars['CoachArr'][$this->_sections['coachRow']['index']]['availability_country'] != ''):  echo $this->_tpl_vars['CoachArr'][$this->_sections['coachRow']['index']]['availability_country'];  else: ?>N/A<?php endif; ?></li>
			   <?php endif; ?>
			 </ul>
			 <p class="clear"></p>
			<?php unset($this->_sections['game_nm']);
$this->_sections['game_nm']['name'] = 'game_nm';
$this->_sections['game_nm']['loop'] = is_array($_loop=$this->_tpl_vars['CoachgameArr'][$this->_sections['coachRow']['index']]) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['game_nm']['show'] = true;
$this->_sections['game_nm']['max'] = $this->_sections['game_nm']['loop'];
$this->_sections['game_nm']['step'] = 1;
$this->_sections['game_nm']['start'] = $this->_sections['game_nm']['step'] > 0 ? 0 : $this->_sections['game_nm']['loop']-1;
if ($this->_sections['game_nm']['show']) {
    $this->_sections['game_nm']['total'] = $this->_sections['game_nm']['loop'];
    if ($this->_sections['game_nm']['total'] == 0)
        $this->_sections['game_nm']['show'] = false;
} else
    $this->_sections['game_nm']['total'] = 0;
if ($this->_sections['game_nm']['show']):

            for ($this->_sections['game_nm']['index'] = $this->_sections['game_nm']['start'], $this->_sections['game_nm']['iteration'] = 1;
                 $this->_sections['game_nm']['iteration'] <= $this->_sections['game_nm']['total'];
                 $this->_sections['game_nm']['index'] += $this->_sections['game_nm']['step'], $this->_sections['game_nm']['iteration']++):
$this->_sections['game_nm']['rownum'] = $this->_sections['game_nm']['iteration'];
$this->_sections['game_nm']['index_prev'] = $this->_sections['game_nm']['index'] - $this->_sections['game_nm']['step'];
$this->_sections['game_nm']['index_next'] = $this->_sections['game_nm']['index'] + $this->_sections['game_nm']['step'];
$this->_sections['game_nm']['first']      = ($this->_sections['game_nm']['iteration'] == 1);
$this->_sections['game_nm']['last']       = ($this->_sections['game_nm']['iteration'] == $this->_sections['game_nm']['total']);
?> 
			<!--div style="font-size:14px; padding-top:8px;"><span>Game :</span> <?php echo $this->_tpl_vars['CoachgameArr'][$this->_sections['coachRow']['index']][$this->_sections['game_nm']['index']]['game']; ?>
</div-->
            <ul class="games-desc">
			   <li><label class="gametype" style="width:80%; font-size:14px; padding-bottom:3px;"><?php echo $this->_tpl_vars['CoachgameArr'][$this->_sections['coachRow']['index']][$this->_sections['game_nm']['index']]['game']; ?>
</label></li>
			   <li><span>Rate :</span> <?php if ($this->_tpl_vars['CoachgameArr'][$this->_sections['coachRow']['index']][$this->_sections['game_nm']['index']]['rate'] != ''): ?>$<?php echo $this->_tpl_vars['CoachgameArr'][$this->_sections['coachRow']['index']][$this->_sections['game_nm']['index']]['rate'];  else: ?>N/A<?php endif; ?></li>
			   <?php if ($this->_tpl_vars['CoachgameArr'][$this->_sections['coachRow']['index']][$this->_sections['game_nm']['index']]['is_ladder'] == 'Y'): ?>
			   <li><span>Ladder :</span> <?php if ($this->_tpl_vars['CoachgameArr'][$this->_sections['coachRow']['index']][$this->_sections['game_nm']['index']]['ladder'] != ''):  echo $this->_tpl_vars['CoachgameArr'][$this->_sections['coachRow']['index']][$this->_sections['game_nm']['index']]['ladder'];  else: ?>N/A<?php endif; ?></li>
			   <?php endif; ?>
			   <?php if ($this->_tpl_vars['CoachgameArr'][$this->_sections['coachRow']['index']][$this->_sections['game_nm']['index']]['is_server'] == 'Y'): ?>
			   <li><span>Server :</span> <?php if ($this->_tpl_vars['CoachgameArr'][$this->_sections['coachRow']['index']][$this->_sections['game_nm']['index']]['server'] != ''):  echo $this->_tpl_vars['CoachgameArr'][$this->_sections['coachRow']['index']][$this->_sections['game_nm']['index']]['server'];  else: ?>N/A<?php endif; ?> </li>
			   <?php endif; ?>
               <?php if ($this->_tpl_vars['CoachgameArr'][$this->_sections['coachRow']['index']][$this->_sections['game_nm']['index']]['is_region'] == 'Y'): ?>
			   <li><span>Region :</span> <?php if ($this->_tpl_vars['CoachgameArr'][$this->_sections['coachRow']['index']][$this->_sections['game_nm']['index']]['region'] != ''):  echo $this->_tpl_vars['CoachgameArr'][$this->_sections['coachRow']['index']][$this->_sections['game_nm']['index']]['region'];  else: ?>N/A<?php endif; ?> </li>
			   <?php endif; ?>
            </ul>
            <ul class="games-desc">
			   <li style="padding-bottom:3px;">&nbsp;</li>
			   <li style="padding-bottom:3px;">&nbsp;</li>
			   <?php if ($this->_tpl_vars['CoachgameArr'][$this->_sections['coachRow']['index']][$this->_sections['game_nm']['index']]['is_race'] == 'Y'): ?>
               <li><span>Race :</span> <?php if ($this->_tpl_vars['CoachgameArr'][$this->_sections['coachRow']['index']][$this->_sections['game_nm']['index']]['race'] != ''):  echo $this->_tpl_vars['CoachgameArr'][$this->_sections['coachRow']['index']][$this->_sections['game_nm']['index']]['race'];  else: ?>N/A<?php endif; ?></li>
			   <li>&nbsp;</li>
			   <?php endif; ?>
			   <?php if ($this->_tpl_vars['CoachgameArr'][$this->_sections['coachRow']['index']][$this->_sections['game_nm']['index']]['is_rating'] == 'Y'): ?>
			   <li><span>Rating :</span> <?php if ($this->_tpl_vars['CoachgameArr'][$this->_sections['coachRow']['index']][$this->_sections['game_nm']['index']]['rating'] != ''):  echo $this->_tpl_vars['CoachgameArr'][$this->_sections['coachRow']['index']][$this->_sections['game_nm']['index']]['rating'];  else: ?>N/A<?php endif; ?> </li>
			   <?php else: ?>
			   <?php endif; ?>
            </ul>
			<div class="clear" style="padding-top:0px;"></div>
			<p style="padding-top:0px; padding-left:2px;">
			<b>Experience</b> : <?php if ($this->_tpl_vars['CoachgameArr'][$this->_sections['coachRow']['index']][$this->_sections['game_nm']['index']]['experience'] != ''):  echo $this->_tpl_vars['CoachgameArr'][$this->_sections['coachRow']['index']][$this->_sections['game_nm']['index']]['experience'];  else: ?>N/A<?php endif; ?></p>
			<?php endfor; endif; ?>
            <div class="clear"></div>
			<div style="width:100%; padding-left:20px;"><div class="button-flex button150">
			<a href="#" onclick="ConfirmDelete('<?php echo $this->_tpl_vars['page_name']; ?>
?action=del','<?php echo $this->_tpl_vars['CoachArr'][$this->_sections['coachRow']['index']]['fav_coach_id']; ?>
','<?php echo $this->_tpl_vars['CoachArr'][$this->_sections['coachRow']['index']]['name']; ?>
','Your favourite coach:: ')">
			<span>Delete From Favourite</span></a></div>
            <div class="view" style="margin-right:5px;"><a href="coachdetails.php?coach_id=<?php echo $this->_tpl_vars['CoachArr'][$this->_sections['coachRow']['index']]['coach_id']; ?>
">view</a></div></div>
         </div>
         <div class="clear"></div>
      </div>
	 <?php endfor; endif; ?> 
     <?php if ($this->_tpl_vars['pagination_arr'][1]): ?>
	 <div class="clear"></div>
      <div class="pagin">
         <ul>
           <?php echo $this->_tpl_vars['pagination_arr'][1]; ?>

         </ul>
      </div>
	 <?php endif; ?>
	 <?php else: ?>
	    No Coach is found......
     <?php endif; ?>
	</div>
</div>	